package nc;
import java.util.*;
public class Niuke {

    static class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int n = Integer.parseInt(sc.nextLine());
            String as = sc.nextLine();
            int a = getMax(as);
            int b = getMax(sc.nextLine());
            int c = getMax(sc.nextLine());
            int len = as.length();
            sc.close();
            //找到最大的两个数
            int[] nums = {a, b, c};
            Arrays.sort(nums);
            int max = nums[2], second = nums[1];
            if (max == second || len - second <= n) {
                System.out.println("draw");
            } else {
                if (max == a) {
                    System.out.println("xiaoming");
                } else if (max == b) {
                    System.out.println("xiaowang");
                } else {
                    System.out.println("xiaoli");
                }
            }
        }

        public static int getMax(String s) {
            char[] cs = s.toCharArray();
            Map<Character, Integer> map = new HashMap<>();
            int max = 0;
            for (int i = 0; i < cs.length; i++) {
                int t = map.getOrDefault(cs[i], 0);
                map.put(cs[i], t + 1);
                max = Math.max(t + 1, max);
            }
            return max;
        }
    }
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        char[] cs = sc.nextLine().toCharArray();
        sc.close();

        //将右边蓝色全部染成红色需要的次数
        int blue2red = 0;
        boolean start = false;
        for (int i = 0; i < n; i++) {
            if (cs[i] == '1') {
                if (start) {
                    blue2red++;
                }
            } else {
                start = true;
            }
        }
        start = false;
        //将左边红色全部染成蓝色需要的次数
        int red2blue = 0;
        for (int i = n - 1; i >= 0; i--) {
            if (cs[i] == '0') {
                if (start) {
                    red2blue++; 
                }
            } else {
                start = true;
            }
        }

        System.out.println(Math.min(red2blue, blue2red));;
    }

    static class Main2 {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int n = Integer.parseInt(sc.nextLine());
            char[] cs = sc.nextLine().toCharArray();
            sc.close();
            int left0 = 0, left1 = 0;
            int right0 = 0, right1 = 0;
            for (int i = n - 1; i >= 0; i--) {
                if (cs[i] == '1') {
                    right1++;
                } else {
                    right0++;
                }
            }
            int min = right1;
            for (int i = 0; i < n; i++) {
                if (cs[i] == '1') {
                    right1--;
                    left1++;
                } else {
                    left0++;
                    right0--;
                }
                min = Math.min(min, left0 + right1);
            }

            System.out.println(min);
        }
    }

}
